package com.zhongke.cotrun.service.impl;

import com.zhongke.cotrun.mapper.ServiceTypeMapper;
import com.zhongke.cotrun.model.pojo.ServiceType;
import com.zhongke.cotrun.model.pojo.ServiceTypeVO;
import com.zhongke.cotrun.service.ServiceTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ServiceTypeServiceImpl implements ServiceTypeService {
    @Autowired
    ServiceTypeMapper serviceTypeMapper;

    /**
     * 查询
     *
     * @return
     */
    @Override
    public List<ServiceType> selectServiceType() {
     return   serviceTypeMapper.selectServiceType(1);
    }

    /**
     * 根据条件搜索服务类别
     * @param serviceTypeVO
     * @return
     */
    @Override
    public List<ServiceTypeVO> selectServiceTypeBycondition(ServiceTypeVO serviceTypeVO) {
        return serviceTypeMapper.selectServiceTypeBycondition(serviceTypeVO);
    }

    @Override
    public ServiceTypeVO selectServiceTypeBycode(Integer code) {
        return serviceTypeMapper.selectServiceTypeByCode(code);
    }
}
